<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const person = new Map();
        person.set("name","dai");
        person.set("age",18);
        person.set("hobby",["听歌","追剧","打游戏"]);
        // console.log(person);
        // //Map(3) {'name' => 'dai', 'age' => 18, 'hobby' => Array(3)}
        // console.log(person.get("name"));//dai
        // console.log(person.size)   //3
        // console.log(person.has(age)); //true
        person.set("age",21)
        console.log(person); //{'name' => 'dai', 'age' => 21, 'hobby' => Array(3)}
    </script>
</body>
</html>